package com.daodway.designpattern.commandpattern.macro;

import java.util.ArrayList;


public class MacroCommand implements Command {
	ArrayList<Command> commandList;
	
	public MacroCommand(ArrayList<Command> commandList) {
		super();
		this.commandList = commandList;
	}

	@Override
	public void execute() {
		for(int i=0;i<commandList.size();i++){
			Command c = commandList.get(i);
			c.execute();
		}
	}

}
